package com.admin.education.models;

import com.admin.education.repositories.Identifiable;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Entity
@Table(name = "pictures")
@EntityListeners(AuditingEntityListener.class)
@Data
public class Pictures implements Serializable,Identifiable {
    @Column(name = "id")
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private long id;
    @Column(name="path")
    @Length(max = 2048)
    @NotNull
    private String path;
    @OneToOne
    private Circles circles;
}
